<%--
  Created by IntelliJ IDEA.
  User: hp
  Date: 2021/1/3
  Time: 16:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>

    <title>我的图书 | 编辑图书</title>
    <jsp:include page="/includes/head.jsp" />
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <jsp:include page="/includes/header.jsp" />

    <jsp:include page="/includes/menu.jsp" />
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>新增图书</h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li class="active">新增图书</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form cssClass="form-horizontal" action="/book/add" method="post">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="bookName" class="col-sm-2 control-label">书名</label>

                                <div class="col-sm-10">
                                    <input class="form-control" id="bookName" name="bookName" placeholder="书名"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="author" class="col-sm-2 control-label">作者</label>

                                <div class="col-sm-10">
                                    <input class="form-control" id="author" name="author" placeholder="作者"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="press" class="col-sm-2 control-label">出版社</label>

                                <div class="col-sm-10">
                                    <input class="form-control" id="press" name="press" placeholder="出版社"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="isbn" class="col-sm-2 control-label">国际标准书号</label>

                                <div class="col-sm-10">
                                    <input class="form-control" id="isbn" name="isbn" placeholder="国际标准书号"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="category" class="col-sm-2 control-label">图书分类</label>

                                <div class="col-sm-10">
                                    <select class="form-control" id="category" name="category"/>
                                    <option selected value="0">请选择分类</option>
                                    <c:forEach var="book" items="${books}">
                                        <option value="${book.category}">${book.category}</option>
                                    </c:forEach>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="price" class="col-sm-2 control-label">图书单价</label>

                                <div class="col-sm-10">
                                    <input class="form-control" name="price" id="price" placeholder="图书单价"/>
                                </div>
                            </div>

                            <!-- /.box-body -->
                            <div class="box-footer">
                                <button type="button" class="btn btn-default" onclick="history.go(-1);">返回</button>
                                <button type="reset" class="btn btn-info pull-center">重置</button>
                                <button type="submit" class="btn btn-info pull-right">提交</button>
                            </div>
                        </div>
                            <!-- /.box-footer -->
                            </form>
                        </div>
                    </div>
                </div>
        </section>
    </div>
    <jsp:include page="/includes/copyright.jsp" />
</div>
<jsp:include page="/includes/footer.jsp" />
</body>
</html>
